<!DOCTYPE html>
<html>
    <head>
        <title><?php echo $content['title'] ?></title>
        <?php include 'view/header.html'; ?>
        <link rel="stylesheet" type="text/css" href="view/css/backOffice.css">
    </head>
    <body>
        <div id="site">
            <div id="haut">
                <div id="banniere"></div>
            </div>
            <div id="menu_all">
                <div id="menu"><?php include 'view/backOffice/menu.php'; ?></div>
            </div>
            <div id="middle_left"></div>
            <div id="middle_up">
                <?php include 'view/sous_menus.php'; ?>
                <div id="nom_menu"><p><?php echo $content['nom_menu'] ?></p></div>
            </div>
            <div id="middle_mid">
                <div id="tools">
                    <form method="post" action="adminSite.php?page=editEvent">
                        <input type="hidden" name="add" value="add"></input>
                        <input type="submit" value="ajouter évènement"></input>    
                    </form> </div>
                <?php
                while( $row = mysql_fetch_array($content['event']) ){
                ?>
                <div class="middle_article">
                <?php
                    echo '<h2>'.$row['EVENT_TITLE'].'</h2>';
                    echo '<img src="'. $row['EVENT_IMG'] .'" style="width : 150px;">';
                    echo '<p>'.substr($row['EVENT_CONTENT'], 0, 100).'...</p>';
                    echo '<form class="event_form" method="post" action="adminSite.php?page=editEvent">';
                    echo '<input type="hidden" name="id" value="'.$row['EVENT_ID'].'">';                    
                    echo '<p>Date : '.  substr($row['EVENT_TIME'], 8, 2).'/'.substr($row['EVENT_TIME'], 5, 2).'/'.substr($row['EVENT_TIME'], 0, 4).'</p>';
                    echo ' Horaire : '.$row['EVENT_HOUR'];
                    echo '<input type="submit" value="edit"';
                    echo '</form>';
                
                    ?></div><?php
                }
                ?>
            </div>
            <div id="middle_down"></div>
            <div id="barre_down"></div>
        </div>
    </body>
</html>
